<!DOCTYPE html>

<html lang="en-US">
<@common.header/>

<body class="page-sub-page page-listing-lines page-search-results" id="page-top">
<!-- Wrapper -->
<div class="wrapper">
    <!-- Navigation -->
   <@common.nav/><!-- /.navigation -->
    <!-- end Navigation -->
    <!-- Page Content -->
    <div id="page-content">
        <!-- Breadcrumb -->
        <div class="container">
            <ol class="breadcrumb">
                <li><a href="#">主页</a></li>
                <li class="active">房产列表</li>
            </ol>
        </div>
        <!-- end Breadcrumb -->

                      

        <div class="container" style="font-size: 16px;font-weight: 700;">
            <div class="row">
                <!-- Results -->
                <div class="">
                    <section  style="margin-top: 20px;margin-bottom: 30px;">
                        <form role="form" id="searchForm" class="form-search" method="post" action="/house/list">

                            <div class="form-group">
                                <div class="input-group" style="width: 70%">
                                <input type="text" class="form-control" id="search-box-property-id" value="${(vo.name)!}" name="name" placeholder="请输入区域或者小区名开始找房"  style="background-color: #1396e2k;height: 60px;">
                                    <span class="input-group-btn">

                                        <button class="btn btn-default" type="submit" style="height: 60px;"  > <span style="display: block;margin-top: 10px;font-size: 16px;font-weight: 600"><i class="fa fa-search"></i>开始找房</span></button>
                                     </span>

                                </div>
                            </div>

                            <input type="text" name="type" value="1" hidden>
                            <input type="text" value="${(pageCondition.sort)!}" name=sort hidden="true">
                            <input type="text" name="sorting" value="${(pageCondition.sort)!}" hidden="true">

                        </form>
                    </section>


                    <section id="results">
                        <header><h1><i class="fa fa-search"></i>共找到${count}套在售房源</h1></header>

                        <div class="btn-toolbar" role="toolbar">
                            <div class="btn-group">
                                <button type="button" class="btn btn-default btn-lg" onclick="changeSorting('time_desc');" style="width:100px;">默认排序</button>

                            </div>
                            <div class="btn-group">
                                <button type="button" class="btn btn-info btn-lg" onclick="changeSorting('time_desc');" style="width:100px;">最新</button>

                            </div>
                            <div class="btn-group">
                                <button type="button" class="btn btn-info btn-lg" onclick="changeSorting('price_desc');" style="width: 100px;">总价</button>

                            </div>
                            <div class="btn-group">
                                <button type="button" class="btn btn-info btn-lg" style="width: 100px;">面积</button>

                            </div>
                        </div>
                       <#-- <section id="search-filter">
                                 <div class="sorting">
                                    <div class="form-group">
                                        <select name="sorting" id="sorting">
                                        <option value="">排序</option>
                                        <option value="price_asc"   <#if (pageCondition.sort) == "price_asc">   selected </#if>  >价格由低到高</option>
                                        <option value="price_desc"  <#if (pageCondition.sort) == "price_desc">  selected </#if> >价格由高到低</option>
                                            <option value="time_desc"   <#if (pageCondition.sort) == "time_desc">   selected </#if> >加入时间</option>
                                        </select>
                                    </div>
                                </div>
                            </figure>
                        </section>-->
                    <section id="properties" class="display-lines" style="margin-top: 50px;">
                      <#list ps.list as house>
                            <div class="property">
                                <figure class="tag status">
                                    <#if house.type == 1>
                                    销售
                                <#else>
                                                        出租
                                </#if></figure>
                                <div class="property-image">
                                   <#-- <figure class="ribbon">新 上</figure>-->
                                    <a href="/house/detail?id=${house.id}">
                                        <img alt="" src="${house.firstImg}" style="width: 260px;height: 195px" >
                                    </a>
                                </div>

                                <div class="info">
                                    <header>
                                        <a href="/house/detail?id=${house.id}"><h3>${house.name}</h3></a>
                                        <figure style="margin-top: 15px;">${house.address}</figure>

                                        <div class="tag price" >价格：￥ ${house.price}万</div>   <div class="tag " >面积：${house.area} m<sup>2</sup></div>   <div class="tag " >布局:${house.beds}室${house.baths}卫1厅</div>
                                        <a type="button" class="btn btn-info btn-lg" style="float: right"  href="/house/bookmark?id=${house.id}" style="width:100px;"><i class="fa fa-heart"></i>关注</a>

                                    </header>
                                    <div>

                                    </div>
                                    <aside>
                                         <p style="width: 700px;font-size: 20px;font-weight: 500">${house.remarks}I
                                        </p>
                                        <p></p>

                                        <dl >



                                        </dl>


                                    </aside>

                                    <a href="/house/detail?id=${house.id}" class="link-arrow">查看详情</a>

                                </div>


                            </div>

                      </#list>
                       </section>
                            <!-- Pagination -->
                            <div class="center">
                                 <@common.paging ps.pagination/>
                            </div><!-- /.center-->
                        </section><!-- /#properties-->
                    </section><!-- /#results -->
                </div><!-- /.col-md-9 -->
                <!-- end Results -->

                <!-- sidebar -->
               <#-- <div class="col-md-3 col-sm-3">
                </div>-->
                <#--<div class="col-md-3 col-sm-3">-->
                    <#--<section id="sidebar">-->
                        <#--<aside id="edit-search">-->
                            <#--<header><h3>搜索房产</h3></header>-->
                            <#--<form role="form" id="searchForm" class="form-search" method="post" action="/house/list">-->

                                <#--<div class="form-group">-->
                                    <#--<input type="text" class="form-control" id="search-box-property-id" value="${(vo.name)!}" name="name" placeholder="尝试输入小区名">-->
                                <#--</div>-->
                                <#--<div class="form-group">-->
                                    <#--<select name="type">-->
                                        <#--<option value="1" >类型</option>-->
                                        <#--<option value="1" <#if (vo.type)?? && (vo.type)==1> selected </#if> >售卖</option>-->
                                        <#--<option value="2" <#if (vo.type)?? && (vo.type)==2> selected </#if> >出租</option>-->
                                    <#--</select>-->
                                <#--</div><!-- /.form-group &ndash;&gt;-->
                                <#--<input type="text" value="${(pageCondition.sort)!}" name=sort hidden="true">-->
                                <#--<div class="form-group">-->
                                    <#--<button type="submit" class="btn btn-default">搜索</button>-->
                                <#--</div><!-- /.form-group &ndash;&gt;-->
                            <#--</form><!-- /#form-map &ndash;&gt;-->
                        <#--</aside><!-- /#edit-search &ndash;&gt;-->
                        <#--<aside id="featured-properties">-->
                            <#--<header><h3>热门房产</h3></header>-->
                            <#--<#list recomHouses as house>-->
                            <#--<div class="property small">-->
                                <#--<a href="/house/detail?id=${house.id}">-->
                                    <#--<div class="property-image">-->
                                        <#--<img alt="" src="${(house.firstImg)!}" style="width: 100px;height: 75px">-->
                                    <#--</div>-->
                                <#--</a>-->
                                <#--<div class="info">-->
                                    <#--<a href="/house/detail?id=${house.id}"><h4>${(house.name)!}</h4></a>-->
                                    <#--<figure>${(house.address)!} </figure>-->
                                    <#--<div class="tag price">￥${(house.price)!} 万</div>-->
                                <#--</div>-->
                            <#--</div><!-- /.property &ndash;&gt;-->
                            <#--</#list>-->
                            <#---->
                        <#--</aside><!-- /#featured-properties &ndash;&gt;-->

                    <#--</section><!-- /#sidebar &ndash;&gt;-->
                <#--</div><!-- /.col-md-3 &ndash;&gt;-->
                <!-- end Sidebar -->
            </div><!-- /.row -->
        </div><!-- /.container -->
    </div>
    <!-- end Page Content -->
    <!-- Page Footer -->
     <@common.footer/>
    <!-- end Page Footer -->
</div>

<@common.js/>
<!--[if gt IE 8]>
<script type="text/javascript" src="assets/js/ie.js"></script>
<![endif]-->
 <script  type="text/javascript" >
     

     $(document).ready(function() {
          var errorMsg   = "${errorMsg!""}";
          var successMsg = "${successMsg!""}";
          if(errorMsg){ 
              errormsg("error",errorMsg);
          }
          if(successMsg) {
              successmsg("success",successMsg);
          }
        })
      
      
  
        function changeSorting(type){
            window.location.href=  "/house/list?sort="+type+"&name=" + "${(vo.name)!}" + "&type=" + "${(vo.type)!1}" ;
        }

        
 </script>

</body>
</html>